package api.finance;

import com.github.pagehelper.PageInfo;
import dto.Dto;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import pojo.BuyOrder;
import pojo.Journal;
import pojo.Pay_order;
import pojo.Receipt_order;
import pojo.finance.Day;
import pojo.finance.Fukuandan;
import pojo.finance.Kehuduizhang;
import pojo.finance.Zijinduizhang;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;


public interface Finance_Api {

    /**
     * 用于查询全部收款单*/
    @RequestMapping("/allreceipt_order")
    Dto<PageInfo<Receipt_order>> allreceipt_order(@RequestBody Map<String,Object> map);

    /**查询某一收款单*/
    @RequestMapping("/selectReceipt_order")
    Dto<Receipt_order>  selectReceipt_order(@RequestParam(value = "code") String code);

    /**测试用*/
    @RequestMapping("/allReceipt_order")
    Dto<List<Receipt_order>> allReceipt_order();

    /**查询订单的对应的全部收款单位已完成状态的收款单总金额*/
    @RequestMapping("/selectallReceipt_ordermoney")
    Dto<BigDecimal> selectallReceipt_ordermoney(@RequestParam(value = "code") String code);

    /**管理员添加收款单*/
    @RequestMapping("/addReceipt_order")
    Dto addReceipt_order(@RequestBody Receipt_order receipt_order);

    /**收款单作废操作*/
    @RequestMapping("/zuofei")
    Dto zuofei(@RequestBody Map<String,Object> map);

    /**收款单审核操作*/
    @RequestMapping("/shenhe")
    Dto shenhe(@RequestBody Map<String,Object> map);

    /**收支流水单分页查询*/
    @RequestMapping(value = "/alljournal")
    Dto<PageInfo<Journal>> alljournal(@RequestBody Map<String,Object> map);

    /**用于查询全部付款单*/
    @RequestMapping("/allPay_order")
    Dto<PageInfo<Fukuandan>> allPay_order(@RequestBody Map<String,Object> map);

    /**用于添加付款单*/
    @RequestMapping("/addPay_order")
    Dto addPay_order(@RequestBody Pay_order pay_order);

    /**用于付款单作废操作*/
    @RequestMapping("/fukuanzuofei")
    Dto fukuanzuofei(@RequestBody Map<String,Object> map);

    /**根据某一付款单的code查询某一付款单信息*/
    @RequestMapping("/selectpay_order")
    Dto selectpay_order(@RequestParam(value = "code") String code);

    /**用于付款审核*/
    @RequestMapping("/fukuanshenhe")
    Dto fukuanshenhe(@RequestBody Map<String,Object>map);

    /**用于客户对账的客户查询及其金额计算*/
    @RequestMapping("/selectusermoney")
    Dto<PageInfo<Kehuduizhang>> selectusermoney(@RequestBody Map<String,Object> map);

    /**用于客户对账页面的总计*/
    @RequestMapping("/selectusersum")
    Dto<Kehuduizhang> selectusersum();

    /**用于客户对账详情页面的总计*/
    @RequestMapping("/selectoneusersum")
    Dto<Kehuduizhang> selectoneusersum(@RequestParam(value = "id") String id);

    /**用于客户对账详情页面的用户所属单据显示*/
    @RequestMapping("/selectoneuseralldan")
    Dto<PageInfo<BuyOrder>> selectoneuseralldan(@RequestBody Map<String,Object> map);

    /**用于资金账户页面的某个时间段的收支帐*/
    @RequestMapping("/selectdangtianzhang")
    Dto<PageInfo<Zijinduizhang>> selectdangtianzhang(@RequestBody Map<String,Object> map);

    /**用于资金账户明细*/
    @RequestMapping("/selectzijinmingxi")
    Dto<PageInfo<Journal>> selectzijinmingxi(@RequestBody Map<String,Object> map);

    /**用于资金账户的7天内资金收支记录折线图*/
    @RequestMapping("/zijinzhexiantu")
    Dto<List<Day>> zijinzhexiantu();

    /**根据code查询某一订单的所有收款单 */
    @RequestMapping("/codeselectallreceipt")
    Dto<List<Receipt_order>> codeselectallreceipt(@RequestParam(value = "code") String code);

    /**根据code查询某一订单的所有付款单 */
    @RequestMapping("/codeselectallfukuandan")
    Dto<List<Pay_order>> codeselectallfukuandan(@RequestParam(value = "code") String code);

    /**用于查询状态为已完成状态的付款单*/
    @RequestMapping("/selectallokfukuandan")
    Dto selectallokfukuandan(@RequestParam(value = "code")String code);

    /**修改付款单上传凭证*/
    @RequestMapping("upPay_order")
    Dto upPay_order(@RequestBody Map<String,Object> map);

}
